package com.southpark.demo.control.commands.config
{
	import com.adobe.cairngorm.control.CairngormEvent;
	import com.southpark.demo.control.commands.BaseCommand;
	import com.southpark.demo.control.events.config.GetConfigSettingsEvent;
	import com.southpark.demo.control.proxies.config.GetConfigSettingsProxy;
	import com.southpark.framework.control.responders.IResponder;


	public class GetConfigSettingsCommand extends BaseCommand
	{
		override public function execute(cairngormEvent:CairngormEvent):void
		{
			var event:GetConfigSettingsEvent = cairngormEvent as GetConfigSettingsEvent;
			var responder:IResponder = new GetConfigSettingsResponder(event.responder);
			var proxy:GetConfigSettingsProxy = new GetConfigSettingsProxy(responder);
			
			proxy.execute();
		}
		
	}
}
	



//internal responder class
{
	import com.southpark.framework.control.responders.IResponder;
	import com.southpark.demo.control.responders.BaseResponder;
	import com.southpark.demo.vo.config.ConfigSettingsVO;
	
	
	class GetConfigSettingsResponder extends BaseResponder
	{
		
		public function GetConfigSettingsResponder(responder:IResponder)
		{
			super(responder);
		}
		
		override public function onSuccess(result:Object):void
		{
			model.configSettings = result as ConfigSettingsVO;
			super.onSuccess(result);
		}
		
		
		
	} 
}